

package net.qiqbframework.loadhanding;

import net.qiqbframework.messaging.Message;
import net.qiqbframework.modelling.domain.AggregateModel;
import net.qiqbframework.modelling.domain.BizIdentifierModel;


public interface LoadMessage<ID, AR> extends Message<ID> {

    /**
     * 获取聚合名称
     *
     * @return
     */
    String getAggregateNaming();

    /**
     * 获取业务ID名称
     *
     * @return
     */
    String getBusinessIdName();

    Class<AR> getAggregateType();

    AggregateModel<AR> getAggregateModel();

    BizIdentifierModel<ID> getBizIdentifierModel();

    /**
     * 是否启动缓存。启动缓存的
     * @return
     */
    boolean enableCaching();


    default LoadMessage<ID, AR> next() {
        return null;
    }

    void next(LoadMessage<ID, AR> nextLoad);
}
